<template>
    <view class="wrap">
        <u-card v-for="(item, index) in content" :key="index">
            <view slot="head">
                <view class="nav-title__text">{{ item.ssCompetitionEntity.cName }}</view>
            </view>
            <view slot="body">
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 ttp">
                    <view class="u-body-item-title u-line-2">准考证号：{{ item.rZkzh }}</view>
                </view>
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0">
                    <view class="u-body-item-title u-line-2">竞赛开始时间：{{ item.ssCompetitionEntity.cStartTime }}</view>
                </view>
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 ttp">
                    <view class="u-body-item-title u-line-2">竞赛科目：{{ item.cSubject }}</view>
                </view>
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 ttp">
                    <view class="u-body-item-title u-line-2">竞赛场地：{{ item.ssCompetitionEntity.cAdds }}</view>
                </view>
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 ttp">
                    <view class="u-body-item-title u-line-2">要求人数：{{ item.ssCompetitionEntity.cNumbers }} 人</view>
                </view>
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 ttp">
                    <view class="u-body-item-title u-line-2">竞赛时长：{{ item.ssCompetitionEntity.cLangt }} 分钟</view>
                </view>
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 ttp">
                    <view class="u-body-item-title u-line-2">注意事项：{{ item.ssCompetitionEntity.cAbout }}</view>
                </view>
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 ttp">
                    <view class="u-body-item-title u-line-2">负责人：{{ item.ssCompetitionEntity.cUser }}</view>
                </view>
                <view class="u-body-item u-flex u-border-bottom u-col-between u-p-t-0 ttp">
                    <view class="u-body-item-title u-line-2">联系方式：{{ item.ssCompetitionEntity.cPhone }}</view>
                </view>
            </view>
        </u-card>
    </view>
</template>

<script>
export default {
    name: 'notice_list',
    data() {
        return {
            content: [],
            user: {}
        }
    },
    computed: {},
    onShow() {
        uni.setNavigationBarTitle({
            title: '已报竞赛'
        })
    },
    created() {},
    onLoad() {
        this.user = uni.getStorageSync('user_info')
    },
    mounted() {
        this.getData()
    },
    methods: {
        openPage(item) {
            var p = JSON.stringify(item)
            this.$u.route({
                url: 'pages/comp/comp_show?p=' + p
            })
        },
        getData() {
            this.$u.get('/apps/ssResultsEntity', { idUser: this.user.id }).then(res => {
                this.content = res.content
            })
        }
    }
}
</script>

<style lang="scss" scoped>
.u-cell-icon {
    width: 36rpx;
    height: 36rpx;
    margin-right: 8rpx;
}
.nav-wrap {
    padding: 15px;
    position: relative;
}

.lang {
    position: absolute;
    top: 15px;
    right: 15px;
}

.nav-title {
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    flex-direction: row;
    align-items: center;
}

.nav-info {
    margin-left: 15px;
}

.nav-title__text {
    /* #ifndef APP-NVUE */
    display: flex;
    /* #endif */
    color: $u-main-color;
    font-size: 25px;
    font-weight: bold;
}

.logo {
    width: 70px;
    /* #ifndef APP-NVUE */
    height: auto;
    /* #endif */
}

.nav-slogan {
    color: $u-tips-color;
    font-size: 14px;
}

.nav-desc {
    margin-top: 10px;
    font-size: 14px;
    color: $u-content-color;
}
</style>
